﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfForumInfo.aspx.cs" Inherits="msBsc.WebUi.mMall.Public.mfForumInfo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客-旅游推荐</title>
    <%=getMeta()%>
    <link href="/themes/mStyle1/css/home/base.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mhome.css" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <style type="text/css">
        .forumlist {
            bottom: 0;
            left: 0;
            overflow: auto;
            top: 97px;
            width: 100%;
            z-index: -1;
            overflow-x: visible;
            overflow-y: visible;
        }

        .listcon {
            position: relative;
            width: 100%;
        }

            .listcon dl {
                border: 1px solid #ffffff;
                background-color: #ffffff;
                border-radius: 7px;
                margin: 13px auto;
                overflow: auto;
                position: relative;
                width: 98%;
            }

                .listcon dl dt {
                    display: block;
                    float: left;
                    width: 60px;
                }

        a {
            color: inherit;
            outline: medium none;
            text-decoration: none;
        }

        .listcon dl dt img {
            display: block;
            height: 40px;
            margin: 8px auto;
            width: 40px;
            border-radius: 55px;
        }

        img {
            border: 0 none;
        }

        .listcon dl dd {
            display: block;
            font-size: 15px;
            line-height: 21px;
        }

            .listcon dl dd h3 {
                font-size: 12px;
                font-weight: normal;
                color: #acacac;
                margin-top: 15px;
            }

            .listcon dl dd p {
                color: #666666;
                line-height: 30px;
                font-size: 14px;
                font-weight: bold;
            }

        .b_price {
            color: red;
            font-size: 15px;
            font-weight: bold;
        }

        .span_r {
            float: right;
            margin-right: 5px;
            border-radius: 7px;
            display: inline-block;
            font-size: 12px;
            min-width: 50px;
            text-align: center;
        }

        body {
            margin: 0;
            padding: 0;
            background-color: #ffffff;
        }

        .viewport {
            background-color: #edeeee;
        }

        .green {
            background: none repeat scroll 0 0 #69cd38;
            border: medium none;
            border-radius: 7px;
            color: #fff;
            cursor: pointer;
            display: inline-block;
            font-size: 16px;
            font-weight: bold;
            height: 36px;
            line-height: 36px;
            padding: 0 20px;
            text-align: center;
            min-width: 200px;
            width: 100%;
        }

        .fabu {
            width: 95%;
            margin: 15px auto;
        }

        .pageInfo {
            font-size: 18px;
            height: 20px;
            padding-left: 10px;
        }

        .log {
            background-color: #ffffff;
            height: 20px;
            margin: 1px auto;
            text-align: center;
            width: 98%;
            cursor: pointer;
        }

        .p_title {
            text-align: center;
            font-size: 16px;
        }

        .p_content {
            font-size: 16px;
            line-height: 28px;
            word-wrap: break-word;
            width: 98%;
            margin: 2px auto;
        }

            .p_content img {
                max-width: 270px;
            }

        .btn_reply {
            max-width: 100px;
            min-width: 100px;
            float: right;
            margin-right: 10px;
            background: url('/themes/mStyle1/Image/public/reply1.gif') no-repeat left #69cd38;
            text-align: right;
        }

        .btn_reply2 {
            max-width: 110px;
            min-width: 110px;
            float: right;
            margin-right: 10px;
            text-align: center;
        }

        .btn_replydiv {
            width: 100%;
            height: 30px;
        }

        .btn_replydiv2 {
            width: 98%;
            height: 150px;
            margin: 2px auto;
        }

        .child_reply {
            background: url('/themes/mStyle1/Image/public/reply2.gif') no-repeat left;
            color: #c3c3c3;
        }

        .input_txt {
            width: 100%;
            height: 100px;
            float: right;
            border-radius: 8px;
            border: 1px solid #c3c3c3;
            margin-bottom: 10px;
        }

        .dl_child {
            border: 2px solid #c3c3c3;
        }
    </style>
</head>
<body style="margin: 0; padding: 0;">
    <div class="viewport">
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(true) %>
        <div class="main">
            <div class="forumlist">

                <div class="p_content" id="pfContent">
                    <%--<img src="http://pic31.nipic.com/20130723/12096623_135908542182_2.jpg" />
                    这里是正文部分内容这里是正文部--%>
                </div>
                <%--<div class="reply">--%>
                   <%-- <div class="btn_replydiv" id="titleReply">
                        <span onclick="commentChange();" class="green btn_reply">评 论</span>
                    </div>--%>
          <%--          <div id="replyInfo" class="listcon">--%>
                        <%-- <dl>
                            <dt><a href="">
                                <img src="/UpLoad/Djack/djack.jpg 67x60img.jpg" /></a>
                            </dt>
                            <dd>
                                <h3><a href="">地界客 回复</a> <span class="span_r">2015/12/1</span></h3>

                                <p>
                                    这里是内容信息
                                </p>
                            </dd>
                            <dd>
                                <div class="btn_replydiv">
                                    <span class="green btn_reply child_reply">回复</span>
                                </div>
                                <div class="btn_replydiv2" style="display: none">
                                    <textarea placeholder="回复xxx" class="input_txt"></textarea>
                                    <div class="btn_replydiv">
                                        <a href="/ms_ReleaseForum.htm" class="green btn_reply2">回复</a>
                                    </div>
                                </div>
                            </dd>
                        </dl>--%>
                    <%--</div>--%>
                    <%--<div id="replytemp" style="display: none">
                    </div>--%>
                   <%-- <div id="loginPage" style="display: none" class="log">更多评论加载中请稍后...</div>
                    <div id="nextPage" onclick="goPage();" class="log">查看更多</div>--%>
                    <%--<div>
                        <div class="btn_replydiv2">
                            <input type="hidden" id="comment" />
                           <textarea id="comment" postsid="" placeholder="我有话说..." class="input_txt"></textarea>
                            <div class="btn_replydiv">
                                <span class="green btn_reply2" onclick="reply(this);">发布评论</span>
                            </div>
                        </div>
                    </div>--%>
                <%--</div>--%>
            </div>
        </div>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
    </div>
    <input type="hidden" id="forumId" />
    <input type="hidden" id="pageIndex" value="1" />
    <%--<script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js"
        type="text/javascript"></script>--%>
    <script type="text/javascript" src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jmPage.js"></script>
    <script type="text/javascript" src="/themes/Style1/jsQt.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/laytpl.js"></script>
    <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>

    <script type="text/javascript">
        //function commentChange() {
        //    var opart = new jsonRow();
        //    opart.AddCell("ACTION", "showComment");
        //    ajaxComm(opart);
        //    //$("#comment").focus();
        //}
        $("#h_title").text("地接客-推荐信息");

        var replyId = "";
        (function () {
            $("#forumId").val(GetQueryStr("forumId"));
            //回复按钮
            //$("#comment").attr("postsid", GetQueryStr("forumId"));
            $.getMessageCount();

        })()

        //var pIndex = 1;
        //var pageSize = 5;
        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = new jsonRow();
            opart = addNoAreStatistics(opart, "旅游推荐详情", "m0015");
            opart.AddCell("forumId", GetQueryStr("forumId"));
            //opart.AddCell("pIndex", $("#pageIndex").val());
            //opart.AddCell("pRows", pageSize);
            opart.AddCell("ACTION", GtGrid1Action);
            ajaxComm(opart);
        };

        //执行AJAX调用时获取参数
        function GetGtParam() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("pIndex", $("#pageIndex").val());
            _jsParam.AddCell("pRows", pageSize);
            _jsParam.AddCell("ACTION", GtGrid1Action);
            return _jsParam;
        };

        btnDo("init");

        function doBoundContent(_shopurl) {
            if (_shopurl != null && _shopurl != undefined && _shopurl != '') {
                jQuery.loadHtml(_shopurl).done(function (_rethtml) {
                    var tpl = HtmlUtil.htmlDecode(_rethtml);
                    $("#pfContent").html(tpl);
                });
            }
        }


        //function goPage() {
        //    var pageIndex = $("#pageIndex").val();
        //    $("#pageIndex").val((parseInt(pageIndex) + 1));
        //    btnDo("getReply");
        //}

        //function setPage(rowCount, index) {
        //    $("#sumCount").html(rowCount);

        //    if (parseInt(index) < 1 || parseInt(rowCount) < 1 || (pageSize * index) >= rowCount) {
        //        $("#loginPage").show();
        //        $("#loginPage").html("下面没有更多评论了...");
        //        $("#nextPage").hide();
        //    }
        //    else {
        //        $("#nextPage").hide();
        //        $("#loginPage").html("正在加载中...");
        //        $("#nextPage").show();
        //    }
        //}


        //$("#comment").focus(function () {
        //    $("#replyInfo .btn_replydiv2").hide();
        //});

        //获取论坛信息
        function setForumInfo(data) {
            $("#pfTitle").html(data.rows[0].SOURCE_POSTS_TITLE);
            doBoundContent(data.rows[0].CONTENT_HTML_URL)
        }

        // 回复帖子

        //function reply(button) {
        //    var replyInfo = $(button).parents().prev().val();
        //    var replyId = $(button).parents().prev().attr("postsid");
        //    if (IsNull(replyInfo)) {
        //        alert("请输入回复内容");
        //        return;
        //    }
        //    if (IsNull(replyId)) {
        //        alert("请选择回复对象");
        //        return;
        //    }
        //    var opart = new jsonRow();
        //    opart.AddCell("replyInfo", replyInfo);
        //    opart.AddCell("replyId", replyId);
        //    opart.AddCell("pIndex", pIndex);
        //    opart.AddCell("pRows", pageSize);
        //    opart.AddCell("forumId", $("#forumId").val());
        //    opart.AddCell("ACTION", "reply");
        //    ajaxComm(opart);
        //}
        //var maxHtml = "";
        //var html = "";
        //function setReplyList(data, parentId) {
        //    //评论加载
        //    //getReplyList(data.rows, parentId, true);
        //    //回复加载
        //    //$("#replytemp").children('dl').each(function (i, e) {
        //    //    getReplyList(data.rows, $(e).attr("postsid"), false, e);
        //    //});

        //    $("#replyInfo").append($("#replytemp").html());
        //    $("#replytemp").html("");
        //    //评论点击 事件绑定
        //    $(".child_reply").click(function () {
        //        //var t=$(this);
        //        var opart = new jsonRow();
        //        opart.AddCell("postsId", $(this).attr("data-value"));
        //        opart.AddCell("ACTION", "showReply");
        //        ajaxComm(opart);
        //        //$("#replyInfo .btn_replydiv2").hide();
        //        //$(".child_reply[data-value='']").parent("div").next("div").slideToggle("normal");

        //    });
        //    //评论 提交数据绑定
        //    $(".input_txt").next().children("span").click(function () {
        //        reply(this);
        //    });
        //    if (data.rows.length < 2) {
        //        $("#titleReply").hide();
        //        $("#nextPage").hide();
        //    }
        //}
        //function getReplyList(replyList, parentid, isFirst, dl) {
        //    if (IsNull(replyList)) { return ""; }
        //    $(replyList).each(function (i, e) {
        //        if (e.RECOVER_TO_POSTS == parentid) {
        //            //如果是 评论加载
        //            temphtm = "回复<a href='/mp_DjackInfo.htm?djackId=" + e.BE_RECOVER_ID + "'>" + e.BE_RECOVER_NICK + "</a>";
        //            maxHtml = "<dl postsid='" + e.RECOVER_POSTS_ID + "' " + (isFirst ? "" : "style='border: 1px dashed #c3c3c3'") + "><dt><a href='/mp_DjackInfo.htm?djackId=" + e.RECOVER_BY_ID + "'><img src='" + e.CUSTOMER_DEFAULT_PIC + " 46x46img.jpg' /></a></dt>";
        //            maxHtml += "<dd><h3><a href='/mp_DjackInfo.htm?djackId=" + e.RECOVER_BY_ID + "'>" + e.RECOVER_BY_PERSON + "</a>" + (isFirst ? "" : temphtm) + " <span class='span_r'>" + e.REVOCER_TIME + "</span></h3>";
        //            maxHtml += "<p>" + e.REVOCER_CONTENT + "</p></dd><dd><div class='btn_replydiv'><span class='green btn_reply child_reply' data-value='" + e.RECOVER_POSTS_ID + "'>回复</span></div>";
        //            maxHtml += "<div class='btn_replydiv2' style='display: none'><textarea postsid='" + e.RECOVER_POSTS_ID + "'  placeholder='回复 " + e.RECOVER_BY_PERSON + ":' class='input_txt'></textarea>";
        //            maxHtml += "<div class='btn_replydiv'><span class='green btn_reply2'>回复</span></div></div></dd>" + (isFirst ? "<dd></dd>" : "") + "";
        //            if (isFirst) {
        //                $("#replytemp").append(maxHtml);
        //            }
        //            else {
        //                $(dl).children().last().append(maxHtml);
        //                getReplyList(replyList, e.RECOVER_POSTS_ID, false, dl);
        //            }
        //        }
        //    });
        //}
        //取消回复
        //function cancelReply() {
        //    $(".reply").hide();
        //    $(".replyTxt").val("");
        //    replyId = "";
        //}
    </script>
</body>
</html>
